A Type System for Tom

نویسندگان

  • Claude Kirchner
  • Pierre-Etienne Moreau
  • Cláudia Tavares
چکیده

Extending a given language with new dedicated features is a general and quite used approach to make the programming language more adapted to problems. Being closer to the application, this leads to less programming flaws and easier maintenance. But of course one would still like to perform program analysis on these kinds of extended languages, in particular type checking and inference. In this case one has to make the typing of the extended features compatible with the ones in the starting language. The Tom programming language is a typical example of such a situation as it consists of an extension of Java that adds pattern matching, more particularly associative pattern matching, and reduction strategies. This paper presents a type system with subtyping for Tom, that is compatible with Java’s type system, and that performs both type checking and type inference. We propose an algorithm that checks if all patterns of a Tom program are well-typed. In addition, we propose an algorithm based on equality and subtyping constraints that infers types of variables occurring in a pattern. Both algorithms are exemplified and the proposed type system is showed to be sound and complete.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A type system for embedded rewriting languages with associative pattern matching : from theory to practice

Programmers are often interested in a way to write error-free programs, i.e. to avoid undesired behaviors. In this context, a type system was conceived as the formal method for specification and proof of programs written in the Tom rewriting language. The Tom programming language is an extension of Java that adds pattern matching, more particularly associative pattern matching, and reduction st...

متن کامل

Wheelset Condition Monitoring Based on Pass-by Vibration Signals

Apart from regular wheel wear such as decreasing wheel diameters and reduced flange thicknesses and heights, wheel flats (WF) and oval wheels (or OOR, Out-Of-Roundness) are the most common wheelset problems for railway vehicles. Within the FP7 Research Project “Saferail”, APT has developed an innovative wheelset monitoring system so-called “Wheel flat and Out of Roundness Monitoring (WORM) syst...

متن کامل

Wheelset Condition Monitoring based on pass-by vibration signals

Apart from regular wheel wear such as decreasing wheel diameters and reduced flange thicknesses and heights, wheel flats (WF) and oval wheels (or OOR, Out-Of-Roundness) are the most common wheelset problems for railway vehicles. Within the FP7 Research Project “Saferail”, APT has developed an innovative wheelset monitoring system so-called “Wheel flat and Out of Roundness Monitoring (WORM) syst...

متن کامل

Askey-wilson Polynomials for Root Systems of Type Bc

This paper introduces a family of Askey-Wilson type orthogonal polynomials in n variables associated with a root system of type BCn. The family depends, apart from q, on 5 parameters. For n = 1 it specializes to the four-parameter family of one-variable Askey-Wilson polynomials. For any n it contains Macdonald’s two three-parameter families of orthogonal polynomials associated with a root syste...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009